<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
<title>订单表</title>
<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<select v-model="order.orderstatus" id="select_div" style="width: 200px" @change="cateName">
					<option selected  value="">全部</option>
					<option v-for="sel in sels" v-bind:value="sel.value">{{sel.week}}</option>
				</select>
			</div>
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.billno" @keyup.enter="query" placeholder="订单号">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<a class="btn btn-primary" @click="ship"><i class="fa fa-pencil-square-o"></i>&nbsp;发货</a>
			<#if shiro.hasPermission("sys:order:update")>
            <a class="btn btn-primary" @click="tuihuo"><i class="fa fa-pencil-square-o"></i>&nbsp;退货</a>
			</#if>
			<#if shiro.hasPermission("sys:order:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
			<a class="btn btn-primary"  @click="exportExcel"><i class="fa fa-trash-o"></i>&nbsp;导出</a>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">

			<div class="form-group">
				<div class="col-sm-2 control-label">用户名</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.username" readonly="readonly"  placeholder="用户名"/>
				</div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">创建时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.createdate" readonly="readonly"  placeholder="创建时间"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">是否支付</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.ispay" readonly="readonly"  placeholder="是否支付 1:已支付 0:未支付"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">订单号</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.billno" readonly="readonly"  placeholder="订单号"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">订单状态</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.orderstatus" readonly="readonly"  placeholder="订单状态"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">支付时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.paydate" readonly="readonly"  placeholder="支付时间"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">支付方式</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.paytype" readonly="readonly"  placeholder="支付方式"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">金额</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.totalfee" readonly="readonly"  placeholder="金额"/>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">物流类型:</div>
				<div class="col-sm-10">
					<select v-model="order.wuliutype" style="width: 200px">
						<option selected  value="">请选择</option>
						<option v-for="wuliu in wulius" v-bind:value="wuliu.no">{{wuliu.com}}</option>
					</select>
				</div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">物流订单号</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="order.wuliuorderno" placeholder="物流订单号"/>
			    </div>
			</div>
			<div class="form-group" style="display: none">
			   	<div class="col-sm-2 control-label">地址</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="address" readonly="readonly"  placeholder="地址"/>
			    </div>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label">地址</div>
				<div class="col-sm-10">
					<input style="width: 1500px" type="text" class="form-control" readonly v-model="address" readonly="readonly"  placeholder="地址"/>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label">商品列表</div>
				<div class="col-sm-10">
					<!--<li v-for="one of list" >{{one.commodityname}}  {{ getSelect(one.selected) }}</li>-->
					<li v-for="one of list" >{{one.commodityname}} [{{ getSelect(one.selected) }}] 数量：{{one.commoditynumber}}</li>

				</div>
			</div>

							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="fahuo" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
	<div v-show="!showList2" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">用户uid</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.uid" placeholder="用户uid"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">创建时间</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.createdate" placeholder="创建时间"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">是否支付</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.ispay" placeholder="是否支付 "/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">订单号</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.billno" placeholder="订单号"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">订单状态</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.orderstatus" placeholder="订单状态"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">支付时间</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.paydate" placeholder="支付时间"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">支付方式</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.paytype" placeholder="支付方式"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">金额 单位 ：分</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.totalfee" placeholder="金额 单位 ：分"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">uuid</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.guid" placeholder="uuid"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">更新时间</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.updatedate" placeholder="更新时间"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">更新人</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.updateuser" placeholder="更新人"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">用户名</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.username" placeholder="用户名"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">是否删除 1:已删除  0：未删除</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.isdelete" placeholder="是否删除 1:已删除  0：未删除"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">物流类型</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.wuliutype" placeholder="物流类型"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">物流订单号</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.wuliuorderno" placeholder="物流订单号"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">地址id</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.addressid" placeholder="地址id"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">商品id</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="order.commodityid" placeholder="商品id"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="tuihuo" value="发货"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/order.js?_${.now?long}"></script>
</body>
</html>